import request from '@/utils/request'

// 查询比赛列表
export function listCompetition(query) {
    return request({
        url: '/business/competition/list',
        method: 'get',
        params: query
    })
}

// 查询比赛详细
export function getCompetition(competitionId) {
    return request({
        url: '/business/competition/' + competitionId,
        method: 'get'
    })
}

// 新增比赛
export function addCompetition(data) {
    return request({
        url: '/business/competition',
        method: 'post',
        data: data
    })
}

// 修改比赛
export function updateCompetition(data) {
    return request({
        url: '/business/competition',
        method: 'put',
        data: data
    })
}

// 删除比赛
export function delCompetition(competitionId) {
    return request({
        url: '/business/competition/' + competitionId,
        method: 'delete'
    })
}

// 获取评委
export function listJudge() {
    return request({
        url: '/business/competition/allJudge',
    })
}

